<?xml version="1.0" encoding="UTF-8" ?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml"
      xmlns:ui="http://java.sun.com/jsf/facelets"
      xmlns:h="http://java.sun.com/jsf/html"
      xmlns:f="http://java.sun.com/jsf/core"
      xmlns:p="http://primefaces.org/ui">

    <ui:composition>

        <p:dialog id="UsuarioViewDlg" widgetVar="UsuarioViewDialog" modal="true" resizable="false"  appendTo="@(body)" header="#{appBundle.ViewUsuarioTitle}" closeOnEscape="true">

            <h:form id="UsuarioViewForm">

                <h:panelGroup id="display">
                    <p:panelGrid columns="2" columnClasses="column" rendered="#{usuarioController.selected != null}">

                        <h:outputText value="#{appBundle.ViewUsuarioLabel_usrId}"/>
                        <h:outputText value="#{usuarioController.selected.usrId}" title="#{appBundle.ViewUsuarioTitle_usrId}"/>

                        <p:outputLabel value="#{appBundle.CreateUsuarioLabel_repaCodigo}" for="repaCodigo" />
                        <p:selectOneMenu id="repaCodigo" value="#{usuarioController.selected.repaCodigo}" disabled="true">
                            <f:selectItems value="#{repartoController.items}" var="itemR" itemValue="#{itemR.repaCodigo2}" itemLabel="#{itemR.repaDenominacion}"/>
                        </p:selectOneMenu>

                        <p:outputLabel value="#{appBundle.CreateUsuarioLabel_depId}" for="depId"/>
                        <p:selectOneMenu id="depId" value="#{usuarioController.selected.depId}" disabled="true">
                            <f:selectItems id="sel3" value="#{departamentoController.items}" var="itemDep" itemValue="#{itemDep.depId}" itemLabel="#{itemDep.depDenominacion}"/>  
                        </p:selectOneMenu>
                        <h:outputText value="#{appBundle.ViewUsuarioLabel_usrCi}"/>
                        <h:outputText value="#{usuarioController.selected.usrCi}" title="#{appBundle.ViewUsuarioTitle_usrCi}"/>

                        <h:outputText value="#{appBundle.ViewUsuarioLabel_usrApellido}"/>
                        <h:outputText value="#{usuarioController.selected.usrApellido}" title="#{appBundle.ViewUsuarioTitle_usrApellido}"/>

                        <h:outputText value="#{appBundle.ViewUsuarioLabel_usrGrado}"/>
                        <h:outputText value="#{usuarioController.selected.usrGrado}" title="#{appBundle.ViewUsuarioTitle_usrGrado}"/>

                        <h:outputText value="#{appBundle.ViewUsuarioLabel_usrCargo}"/>
                        <h:outputText value="#{usuarioController.selected.usrCargo}" title="#{appBundle.ViewUsuarioTitle_usrCargo}"/>

                        <h:outputText value="#{appBundle.ViewUsuarioLabel_usrCorreo}"/>
                        <h:outputText value="#{usuarioController.selected.usrCorreo}" title="#{appBundle.ViewUsuarioTitle_usrCorreo}"/>

                        <h:outputText value="#{appBundle.ViewUsuarioLabel_usrActi}"/>
                        <h:selectBooleanCheckbox id="usrActi" value="#{usuarioController.selected.usrActi}" title="#{appBundle.EditUsuarioTitle_usrActi}"  disabled="true"/>

                        <h:outputText value="#{appBundle.ViewUsuarioLabel_usrClave}"/>
                        <h:outputText value="#{usuarioController.selected.usrClave}" title="#{appBundle.ViewUsuarioTitle_usrClave}"/>

                        <h:outputText value="#{appBundle.ViewUsuarioLabel_usrTipo}"/>
                        <h:outputText value="#{(usuarioController.selected.usrTipo=='A' ? 'ADMININSTRADOR' : 'NORMAL')}" title="#{appBundle.ViewUsuarioTitle_usrTipo}"/>
                    </p:panelGrid>
                    <p:commandButton value="#{appBundle.Close}" onclick="UsuarioViewDialog.hide()"/>
                </h:panelGroup>

            </h:form>

        </p:dialog>

    </ui:composition>

</html>
